package com.xidian.zhiancloud.dao.syset.usermanage;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xidian.zhiancloud.model.syset.RoleList;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleManagerMapper extends BaseMapper<RoleList> {

    RoleList selectByNameAndCode(@Param("companyId") Long companyId,
            @Param("name")String name, @Param("code")String code);

    int addRolePer(@Param("companyId") Long companyId,@Param("name")String name,@Param("code")String code);

    int deleteRolePer(@Param("id")Integer id);

    RoleList selectById(@Param("id")Integer id);

    int updateRolePermissions(@Param("id")Integer id,
                              @Param("name")String name,@Param("code")String code);

    // 角色列表
    List<RoleList> getRoleList();

    int insertRoleUser(@Param("roleids") String roleids,List<String> list);

}
